﻿using AIPlugin.Core;
using AIPlugin.Model;
using IM.Easy.AIGenServices.IServices;
using IM.Easy.Core.Services;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace IM.Easy.AIGenServices.Services
{
    public class AIGenTableService : AppServices, IAIGenTableService
    {
        private AIClient aiClient;
        public AIGenTableService(ISqlSugarClient db, AIClient aIClient) : base(db)
        {
            aiClient = aIClient;
        }

        /// <summary>
        /// 通过ia获取表
        /// </summary>
        public List<SqlField> GetTableByAI(SqlTableDesc parm)
        {
            var result = aiClient.CodeAssistant.GenSqlTable(parm);
            return result;
        }


    }
}
